﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminList.aspx.cs" Inherits="webadmin_AdminList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
    $(function(){
        BindBtn();
        AddTrClass($("#listinfo"));
    })
    function ShowDialog(type,id){
        var url="",title;
        switch(type)
        {
            case 1:
                title="编辑管理员";
                url = "DoAdmin.aspx?type=edit&id=" + id;
                break;
            case 2:
                title = "新增管理员";
                url = "DoAdmin.aspx?type=add";
                break;
        }
        top.CreateIframe(title,url,450,300);
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
   <div id="conBox">
   <table class="form-table">
                    <thead>
                        <tr>
                            <td colspan="3">
                                查询选项</td>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="tr1">
                            <td class="oneTd">
                                <div>
                                    用户名：<asp:TextBox ID="txtUserName" runat="server" CssClass="txtbox"></asp:TextBox>
                                    姓名：<asp:TextBox ID="txtName" runat="server" CssClass="txtbox"></asp:TextBox>
                                    <asp:Button ID="btnSubmit" runat="server" Text="查询" OnClick="btnSubmit_Click" CssClass="button" />
                                    <asp:Button ID="btnReset" runat="server" Text="重置" OnClick="btnReset_Click" CssClass="button" /></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            <div class="ctrlbar">
                <div class="f-left">
                </div>
                <div class="f-right">
                    <a href="javascript:ShowDialog(2,0)" class="toolbtn">
                        <img src="images/ico-add.gif">新 增</a>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="grid-box">
                <table class="grid-table">
                    <thead>
                        <tr>
                            <th class="align-l">
                                用户名</th>
                            <th class="align-l">
                                姓名</th>
                            <th class="align-l">
                                管理员类型</th>
                            <th class="align-l">
                                最后登陆日期</th>
                            <th class="align-l">
                                创建日期</th>
                            <td class="align-c">
                                状态</td>
                            <td class="align-c">
                                编辑</td>
                            <td class="align-c">
                                删除</td>
                        </tr>
                    </thead>
                    <tbody id="listinfo">
                        <asp:Repeater ID="rptAdminInfo" runat="server" OnItemCommand="rptAdminInfo_ItemCommand" OnItemDataBound="rptAdminInfo_ItemDataBound">
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <%#Server.HtmlEncode(Eval("UserName").ToString())%>
                                    </td>
                                    <td>
                                        <%#Server.HtmlEncode(Eval("Name").ToString())%>
                                    </td>
                                    <td>
                                        <%#Server.HtmlEncode(Eval("TName").ToString())%>
                                    </td>
                                    <td>
                                        <%#Eval("LoginTime")%>
                                    </td>
                                    <td>
                                        <%#Eval("AddTime")%>
                                    </td>
                                     <td>
                                        <asp:ImageButton ID="imgLock" runat="server" CommandName="Lock" CommandArgument='<%#Eval("ID")+","+Eval("IsLock")%>' ImageUrl='<%# !Convert.ToBoolean(Eval("IsLock"))?"images/open.gif":"images/close.gif"%>' />
                                    </td>
                                    <td class='align-c'>
                                    <asp:Literal ID="ltlEdite" runat="server"></asp:Literal></td>
                                    <td class='align-c'>
                                     <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("ID")%>' ImageUrl="images/ico-delete.gif" OnClientClick="return confirm('确定要删除该管理员吗?');" ToolTip="删除" /></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
                <div id="noData" runat="server">
                    <div class="noDateMsg">
                        没有任何信息！</div>
                </div>
                  <div id="pageinfo">
                    <webdiyer:AspNetPager ID="anpPage" runat="server" OnPageChanging="anpPage_PageChanging" CurrentPageButtonClass="curPage">
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
